#include <bits/stdc++.h>
using namespace std;

#define ONLINE_JUDGE

#ifndef ONLINE_JUDGE
#define dbg(x...) { cerr << "\033[32;1m" << #x << " -> "; err(x); }
void err() { cerr << "\033[39;0m" << endl; }
template<typename T, typename... A>
void err(T a, A... x) { cerr << a << ' '; err(x...); }
#else
#define dbg(...)
#endif

typedef long long LL;

const int N = 1e5+5;

int n;

bool maze[2][N];
int cnt;
int q;

inline bool off(int x)
{
	assert(x < n && x >= 1);
    bool res = (maze[0][x] || maze[0][x+1]) && (maze[1][x] || maze[1][x+1]);
    dbg(maze[0][x], maze[0][x+1], maze[1][x], maze[1][x+1], x, res);
	return res;
}

unordered_set<int> S;

inline bool check()
{
	return cnt == n-1 && !maze[0][1] && !maze[1][n];
}

bool isOff[N];

inline void update(int r, int c)
{
	maze[r][c] = !maze[r][c];
	if (maze[r][c])
	{
		if (c > 1 && off(c-1) && !isOff[c-1])
		{
			isOff[c-1] = true;
			--cnt;
		}
		if (c < n && off(c) && !isOff[c])
		{
			isOff[c] = true;
			--cnt;
            dbg("FUCK");
		}
	}
	else
	{
		if (c > 1 && !off(c-1) && isOff[c-1])
		{
			isOff[c-1] = false;
			++cnt;
		}
		if (c < n && !off(c) && isOff[c])
		{
			isOff[c] = false;
			++cnt;
		}
	}
	
}

int main(int argc, char const *argv[])
{
	scanf("%d%d", &n, &q);
    cnt = n-1;
	for (int _=0; _<q; ++_)
	{
		int r, c;
		scanf("%d%d", &r, &c);
		--r;
		update(r, c);
		if (check()) puts("YES");
		else puts("NO");
	}

	return 0;
}